package com.rick.minio.service;

import io.minio.Result;
import io.minio.messages.Bucket;
import io.minio.messages.DeleteError;
import io.minio.messages.Item;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

public interface UploadService {
    Boolean makeBucket(String bucketName);

    Boolean removeBucket(String bucketName);

    List<Bucket> getAllBuckets();

    String upload(MultipartFile file);

    String upload(byte data[], String fileName);

    String preview(String fileName);

    void download(String fileName, HttpServletResponse res);

    List<Item> listObjects();

    boolean remove(String fileName);

    Iterable<Result<DeleteError>> removeObjects(List<String> objects);
}
